Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for syncing Assessments from OneTrust to Transcend #376

Merged
merged 102 commits into from
Jan 24, 2025

Conversation

abrantesarthur
Copy link
Member

@abrantesarthur abrantesarthur commented Jan 10, 2025

I suggest starting the review from the command's entrypoint cli-sync-ot.ts.

See updated README for instructions of how to test this. Locally, you'd do yarn ts-node ./src/cli-sync-ot.ts. instead of yarn cli-sync-ot.

  • adds ability to sync Assessments from OneTrust to Transcend or to Disk.
  • renames the command cli-pull-ot -> cli-sync-ot.
  • update code to use codecs to validate shape of assessments pulled from OT.

Note that requests to importOneTrustAssessmentForms fail because we need to update the endpoint, not because the cli has bugs.

Related Issues

Security Implications

[none]

System Availability

[none]

Copy link
Member

@anotherminh anotherminh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the FIXME i think this is honestly ... pretty good and ready to go

src/cli-sync-ot.ts Show resolved Hide resolved
src/oneTrust/helpers/syncOneTrustAssessments.ts Outdated Show resolved Hide resolved
src/oneTrust/helpers/syncOneTrustAssessments.ts Outdated Show resolved Hide resolved
const { risks, ...restQuestion } = question;
const enrichedRisks = (risks ?? []).map((risk) => {
const details = riskDetailsById[risk.riskId];
// FIXME: missing the risk meta data and links to the assessment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to do this FIXME

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! I still need to check what Informa means by "risk metadata and links" and add those here.

Copy link
Member

@michaelfarrell76 michaelfarrell76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is killer, wow!

| file | Path to the file to pull the resource into. Its format must match the fileFormat argument. | string | N/A | false |
| fileFormat | The format of the output file. | string | csv | false |
| resource | The resource to pull from OneTrust. For now, only assessments is supported. | string | assessments | false |
| dryRun | Whether to export the resource to a file rather than sync to Transcend. | boolean | false | false |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth trying to convey that some arguments are conditionally required? E.g. I assume if you have --dryRun then file is required, and if you don't then transcendAuth/transcendUrl are required

@abrantesarthur abrantesarthur merged commit 925b974 into main Jan 24, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants